package com.only4play.portal.cp.message;

import com.only4play.portal.common.error.PortalErrorException;
import com.only4play.portal.common.session.PortalSessionManager;
import com.only4play.portal.cp.api.CpService;
import com.only4play.portal.cp.bean.message.AbstractCpMessage;

import java.util.Map;

/**
 * @author liyuncong
 * @version 1.0
 * @file PortalCpMessageInterceptor
 * @brief PortalCpMessageInterceptor
 * @details PortalCpMessageInterceptor
 * @date 2024-06-07
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2024-06-07               liyuncong          Created
 */
public interface CpMessageInterceptor {

    Boolean intercept(
        AbstractCpMessage cpMessage,
        Map<String, Object> context,
        CpService portalCpService,
        PortalSessionManager sessionManager
    ) throws PortalErrorException;
}
